package com.spc.boot.common.security.entity;
import org.springframework.security.core.userdetails.User;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * 仅用于跟数据库交互
 * 
 * @author devshephard
 *
 */
public class DbUser implements Serializable {

    private static final long serialVersionUID = 2144198774171690642L;

    private String userId; // 用户ID
    private String departmentId; // 所属部门ID
    private String departmentName; // 所属部门名称
    private String loginId; // 登录帐号
    private String password; // 密码
    private String userName; // 用户中文名称
    private Integer loginCount; // 总共登录次数
    private Date lastLoginDate; // 最后登录时间
    private String lastLoginIp; // 最后登录IP
    private Boolean isEnabled = true; // 帐号是否启用
    private Boolean isLocked; // 帐号是否锁定
    private Date lockChangeDate; // 解锁、锁定时间
    private Integer attemptLoginTimes; // 尝试登录失败次数
    private Date lastAttemptDate; // 最后尝试登录时间


    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getLoginId() {
        return loginId;
    }

    public void setLoginId(String loginId) {
        this.loginId = loginId;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Boolean getIsEnabled() {
        return isEnabled;
    }

    public void setIsEnabled(Boolean isEnabled) {
        this.isEnabled = isEnabled;
    }

    public Boolean getIsLocked() {
        return isLocked;
    }

    public void setIsLocked(Boolean isLocked) {
        this.isLocked = isLocked;
    }

    public Date getLockChangeDate() {
        return lockChangeDate;
    }

    public void setLockChangeDate(Date lockChangeDate) {
        this.lockChangeDate = lockChangeDate;
    }

    public Integer getAttemptLoginTimes() {
        return attemptLoginTimes;
    }

    public void setAttemptLoginTimes(Integer attemptLoginTimes) {
        this.attemptLoginTimes = attemptLoginTimes;
    }

    public Date getLastAttemptDate() {
        return lastAttemptDate;
    }

    public void setLastAttemptDate(Date lastAttemptDate) {
        this.lastAttemptDate = lastAttemptDate;
    }

    public int getLoginCount() {
        return loginCount;
    }

    public void setLoginCount(int loginCount) {
        this.loginCount = loginCount;
    }

    public Date getLastLoginDate() {
        return lastLoginDate;
    }

    public void setLastLoginDate(Date lastLoginDate) {
        this.lastLoginDate = lastLoginDate;
    }

    public String getLastLoginIp() {
        return lastLoginIp;
    }

    public void setLastLoginIp(String lastLoginIp) {
        this.lastLoginIp = lastLoginIp;
    }

    public String getDepartmentId() {
        return departmentId;
    }

    public void setDepartmentId(String departmentId) {
        this.departmentId = departmentId;
    }

    public String getDepartmentName() {
        return departmentName;
    }

    public void setDepartmentName(String departmentName) {
        this.departmentName = departmentName;
    }

}
